package com.atguigu.suger.service;

import com.atguigu.suger.bean.C3;
import com.atguigu.suger.bean.Spu;
import com.atguigu.suger.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Author lizhenchao@atguigu.cn
 * @Date 2022/2/21 10:00
 */
@Service
public class ProductServiceImpl implements ProductService {
    
    @Autowired
    ProductMapper product;
    
    @Override
    public BigDecimal gmv(int date) {
        // 从mapper层读取数据, 返回读到的结果
        return product.gmv(date);
    }
    
    @Override
    public List<Map<String, Object>> gmvByTm(int date) {
        return product.gmvByTm(date);
        
    }
    
    @Override
    public List<C3> gmvByC3(int date) {
        return product.gmvByC3(date);
        
    }
    
    @Override
    public List<Spu> gmvBySpu(int date) {
        return product.gmvBySpu(date);
    }
    
}
